{%extends "base.html" %}

{% block mainbody %}
{% autoescape off %}
{{ form.content }}

{% endautoescape  %}
{% if data.username ==  request_user %}
   <div class="col-md-12 column">
      <lable>
      <form class="navbar-form navbar-left" role="search" action="{% url 'userinfo' %}"   enctype="multipart/form-data" method="post">
        {% csrf_token %}
        <p><label for="id_phone_number">用户名: {{ data.username }}</label> </p>


        <p><label for="id_phone_number">头像: </label> 
<img src="/uploads/{{ data.img }}" class="img-rounded" width="200" height="200">

        </p>


                        {{ form.as_p }}

                        <button type="submit" class="btn btn-default">提交</button>
                    </form>
                    </div>

{% else %}

  <div class="col-md-12 column">
      <lable>
        {% csrf_token %}
        <p><label for="id_phone_number">用户名: {{ data.username }}</label> </p>


        <p><label for="id_phone_number">头像: </label> 
<img src="/uploads/{{ data.img }}" class="img-rounded" width="200" height="200">

        </p>

        <p><label for="id_phone_number">描述: {{ data.userinfo}}</label> </p>

                    </div>




{% endif %}
   

{% endblock %}
